// license-header java merge-point
/**
 * This is only generated once! It will never be overwritten.
 * You can (and have to!) safely modify it by hand.
 */
package org.tinaelle.server.domain;
/**
 * @see org.tinaelle.server.domain.AdReferenceTable
 */
public class AdReferenceTableDaoImpl
    extends org.tinaelle.server.domain.AdReferenceTableDaoBase
{
    /**
     * @see org.tinaelle.server.domain.AdReferenceTableDao#toAdReferenceTableDTO(org.tinaelle.server.domain.AdReferenceTable)
     */
    public org.tinaelle.common.dto.AdReferenceTableDTO toAdReferenceTableDTO(final org.tinaelle.server.domain.AdReferenceTable entity)
    {
        return super.toAdReferenceTableDTO(entity);
    }

    /**
     * Retrieves the entity object that is associated with the specified value object
     * from the object store. If no such entity object exists in the object store,
     * a new, blank entity is created
     */
    private org.tinaelle.server.domain.AdReferenceTable loadAdReferenceTableFromAdReferenceTableDTO(org.tinaelle.common.dto.AdReferenceTableDTO adReferenceTableDTO)
    {
        org.tinaelle.server.domain.AdReferenceTable adReferenceTable = this.load(adReferenceTableDTO.getAdReferenceTableId());
        if (adReferenceTable == null)
        {
            adReferenceTable = org.tinaelle.server.domain.AdReferenceTable.Factory.newInstance();
        }
        return adReferenceTable;
    }

    
    /**
     * @see org.tinaelle.server.domain.AdReferenceTableDao#adReferenceTableDTOToEntity(org.tinaelle.common.dto.AdReferenceTableDTO)
     */
    public org.tinaelle.server.domain.AdReferenceTable adReferenceTableDTOToEntity(org.tinaelle.common.dto.AdReferenceTableDTO adReferenceTableDTO)
    {
        org.tinaelle.server.domain.AdReferenceTable entity = this.loadAdReferenceTableFromAdReferenceTableDTO(adReferenceTableDTO);
        this.adReferenceTableDTOToEntity(adReferenceTableDTO, entity, true);
        return entity;
    }
}